{extend name='public/layout' /}
{block name='content'}
<div class="main overflow_h">
    <div class="position"><p><span>更新时间：{:date("Y年m月d日")}</span>您当前的位置：<a href="{:url('Index/index')}">{$site.title}</a> > <a href="{:url('Second/index')}">二手房</a>&gt; {$info.title} </p></div>
    <div class="m_t_15 overflow_h">
        <div class="n_h_simg detail_slide">
            <div class="n_h_simg01 large_box">
                <ul>
                    <li>
                        <img src="{$info.img}" width="562" height="420">
                    </li>
                    {notempty name='info.file'}
                    {volist name='info.file' id='vo'}
                    <li style="display: none;">
                    <img src="{$vo.url}" width="562" height="420">
                    </li>
                    {/volist}
                    {/notempty}
                </ul>
            </div>
            <div class="n_h_simg02">
                <span class="n_arr01 left_btn"></span>
                <div class="small_list">
                    <ul>
                        <li class="on">
                            <div class="n_h_simg02_t"><a href="javascript:;">封面图</a></div>
                            <img src="{$info.img}" width="88" height="66">
                        </li>
                        {volist name='info.file' id='vo'}
                        <li>
                            <div class="n_h_simg02_t"><a target="_blank" href="javascript:;">{$vo.title}</a></div>
                            <img src="{$vo.url}" width="88" height="66">
                        </li>
                        {/volist}

                    </ul>
                </div>
                <span class="n_arr02 right_btn"></span></div>
        </div>
        <div class="n_h_text">
            <div class="n_h_t1 overflow_h">
                <b>{$info.title}</b>
            </div>
            <div class="h_ts" style="width:596px;">
                {php}$houseType=explode(',',$info['house_type']);{/php}
                {volist name='houseType' id='vo'}
                <i class="h_ts0{$i}">{$house_type[$vo]['name']}</i>
                {/volist}
            </div>
            <div class="s_h_s01 overflow_h">
                <ul >
                    <li class="overflow_h" style="width:596px">
                        <span class="text13 s_t1">总价：</span>
                        <span class="s_t1"><i class="text14">{$info.total_price}</i>万</span>
                        <span class="text13 s_t1">{$info.price}元/m<sup>2</sup></span>
                        <a href="{:url('Dai/index')}" class="but15">房贷计算器</a>
                    </li>
                   <li><span class="text13 s_t1">楼层：</span><span class="s_t1">第{$info.floor}层/共{$info.total_floor}层</span></li>
                    <li><span class="text13 s_t1">面积：</span><span class="s_t1"><strong>{$info.mianji}m<sup>2</sup></strong></span></li>
                    <li><span class="text13 s_t1">朝向：</span><span class="s_t1">{$chaoxiang}</span></li>
                    <li><span class="text13 s_t1">户型：</span><span class="s_t1"><strong>{$info.room}房{$info.ting}厅</strong></span></li>
                    <li><span class="text13 s_t1">装修：</span><span class="s_t1">{$zhuangxiu}</span></li>
                    <li style="width:596px"><span class="text13 s_t1">小区：</span><a href="{:url('Xiaoqu/detail',['id'=>$info['estate_id']])}">{$info.estate_name}</a> {$info.niandai}年建</li>
                    <li style="width:596px">
                        <span class="text13 s_t1">地址：</span>
                        <span class="s_t1">
                            {$info.city_name}{$info.area_name}
                        </span>
                        <span class="text13 s_t1">{$info.address}</span>
                        <span class="s_t2"></span>
                    </li>
                </ul>
            </div>
            {empty name='info.user_id'}
            <div class="s_h_s02 overflow_h">
                <dl>
                    <dt><img src="{$site.pcLogo}" width="51" height="49"></dt>
                    <dd><span class="s_th1">{$info.contact}</span><div class=" float_l"><span class="s_th2"></span><span class="s_th3">该房源我最了解，实时保持更新</span></div><a href="javascript:;" data-uri="{:url('Ajax/usedBook',['id'=>$info['id'],'type'=>1])}" class="but16 J_dialog">预约看房</a></dd>
                    <dd>{$site.title}置业顾问</dd>
                </dl>
            </div>
            {else /}
            <div class="s_h_s02 overflow_h">
                <dl>
                    <dt><a href="{:url('Store/index',['uid'=>$info['user_id']])}"><img src="{$user.headimgurl}" ></a></dt>
                    <dd><span class="s_th1">{$user.nickname}</span><div class=" float_l"><span class="s_th2"></span><span class="s_th3">该房源我最了解，实时保持更新</span></div></dd>
                    <dd>{notempty name='user.cardimg'}<span class="s_th4">身份认证</span>{/notempty}<span class="s_th5">手机认证</span><a href="javascript:;" data-uri="{:url('Ajax/usedBook',['id'=>$info['id'],'type'=>1])}" class="J_dialog but16">预约看房</a></dd>
                    <dd>{$user.company}</dd>
                </dl>
            </div>
            {/empty}
            <div class="s_h_s03">
                <div>
                    <span>{$info.contact_phone}</span>
                    <i>联系时请说："在{$site.title}看到..."</i>
                </div>
            </div>
        </div>
    </div>

    <div class="m_t_15 overflow_h">
        <div class="n_h_n3_l">
            <div class="news_h_box">
                <div class="fy_d">
                    <div class="title03"><span class="title-selected">房源介绍</span></div>
                    <div class="fang_description">
                        {$info.info}
                        {notempty name='peitao'}
                        <div><span style="color:#00be78;">房间配套：</span>
                        <ul class="peitao">
                        {$peitao}
                        </ul>
                        </div>
                        {/notempty}
                    </div>
                </div>
                {notempty name='info.tese'}
                <div class="fy_img">
                    <div class="title03"><span class="title-selected">房源特色</span></div>
                    <div class="fang_description">
                        {$info.tese}
                    </div>
                </div>
                {/notempty}
                {notempty name='info.file'}
                <div class="fy_img">
                    <div class="title03"><span class="title-selected">房源图片</span></div>
                    <ul class="overflow_h">
                        {volist name='info.file' id='vo'}
                        <li {if condition='$i%2 neq 0'}class="mar02"{/if}><a class="img_list"  rel="prettyPhoto[]" title="{$vo.title}" href="{$vo.url}"><img src="{$vo.url}" width="398" height="300" /></a></li>
                        {/volist}
                    </ul>
                </div>
                {/notempty}
                <div class="m_t_15 overflow_h">
                    <div class="title03"><span class="title-selected">周边配套</span></div>
                    <iframe width="100%" height="auto" frameborder="0" scrolling="no" src="{:url('Api/map',['id'=>$info['id'],'model'=>'second_house','lat'=>$info.lat,'lng'=>$info.lng])}" id="main" style="height: 500px;"></iframe>

                </div>

                <div class="fy_tl overflow_h" >
                    <div class="title03"><span class="title-selected">本小区相关房源</span></div>
                    <ul>
                        {php}$estate_id=$info['estate_id'];$city=$cityInfo['id'];{/php}
                        {fang:lists table='second_house' field='id,title,mianji,total_price,img,room,ting,mianji' where='status=1 and estate_id=$estate_id' limit='8' id='vo'}
                        <li {if condition="$i % 4 eq 0"}style="margin-right:0;"{/if}>
                            <span class="fy_tl_img"><img src="__IMG__/loading.gif" class="lazy" data-original="{$vo.img}" width="190" height="148"></span>
                            <b><a href="{:url('Second/detail',['id'=>$vo['id']])}" title="{$vo.title}">{$vo.title}</a></b>
                            <p><span class="more">{$vo.room}室{$vo.ting}厅 {$vo.mianji}m<sup>2</sup></span><span class="text14">{$vo.total_price}</span>万</p>
                        </li>
                        {/fang:lists}
                    </ul>
                </div>
                {notempty name='estate'}
                <div class="fy_infor">
                    <div class="overflow_h">
                        <div class="title03"><span class="title-selected">小区简介</span></div>
                        <div class="fang_description">
                            {$estate}
                        </div>
                    </div>
                </div>
                {/notempty}
                <div class="fy_tl overflow_h" >
                    <div class="title03"><span class="more"><a href="{:url('Second/index')}">更多 ></a></span><span class="title-selected">猜你喜欢</span></div>
                    <ul>
                        {php}$minprice=$info['total_price']-15;$maxprice=$info['total_price']+15;{/php}
                        {fang:lists table='second_house' field='id,title,mianji,total_price,img,room,ting,mianji' where='status=1 and city=$city and total_price<$maxprice and total_price>$minprice' limit='8' id='vo'}
                        <li {if condition="$i % 4 eq 0"}style="margin-right:0;"{/if}>
                        <span class="fy_tl_img"><img src="__IMG__/loading.gif" class="lazy" data-original="{$vo.img}" width="190" height="148"></span>
                        <b><a href="{:url('Second/detail',['id'=>$vo['id']])}" title="{$vo.title}">{$vo.title}</a></b>
                        <p><span class="more">{$vo.room}室{$vo.ting}厅 {$vo.mianji}m<sup>2</sup></span><span class="text14">{$vo.total_price}</span>万</p>
                        </li>
                        {/fang:lists}
                    </ul>
                </div>
                <div class="fy_infor">
                    <div class="overflow_h">
                        <div class="title03"><span class="title-selected">免责申明</span></div>
                        <div class="fang_description">
                            {$explain}
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <div class="house_r">
            <div class="title01">{$cityInfo.name}推荐二手房</div>
            <div class="s_h_tuijian">
                {include file='second/right' /}
            </div>
        </div>

    </div>

</div>
<link rel="stylesheet" href="__PUBLIC__/js/photo/css/prettyPhoto.css">
<script src="__PUBLIC__/js/photo/jquery.prettyPhoto.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__JS__/imgList/js/carousel.min.js"></script>
<script>
    $(function(){
        $(".detail_slide").thumbnailImg({
            large_elem: ".large_box",
            small_elem: ".small_list",
            left_btn: ".left_btn",
            right_btn: ".right_btn"
        });
        $("a[rel^='prettyPhoto']").prettyPhoto();
        $('.J_dialog').bind('click',function(){
            var url = $(this).data('uri');
            layer.open({
                type: 2,
                title: false,
                area: ['500px', '400px'],
                shade: 0,
                closeBtn: 1,
                shadeClose: true,
                content:url
            });
        });
    });
</script>
{/block}
